package com.bootdo.wx.service;

import com.bootdo.common.utils.R;
import com.bootdo.wx.domain.OrderOrderDO;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 订单信息表
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2019-05-27 17:57:00
 */
public interface OrderOrderService {
	
	OrderOrderDO get(String id);
	
	List<OrderOrderDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(OrderOrderDO orderOrder);
	
	int update(OrderOrderDO orderOrder);
	
	int remove(String id);
	
	int batchRemove(String[] ids);

	R addCartOrder(Map<String,Object> map);

	R addGoodsOrder(Map<String,Object> map);

	PageInfo<Map<String,Object>> getOrderListByStatus(Map<String,Object> paramMap);

	int setStatusOrder (Map<String,Object> paramMap);

	int setComent(Map<String,Object> paramMap);

	Map<String,Object> getOrderById(Map<String,Object> paramMap);

	Map<String,Object> getPOrderById(Map<String,Object> paramMap);

	Map<String,Object> getKOrderById(Map<String,Object> paramMap);

	R addBargainGoodsOrder(Map<String,Object> map);

	List<Map<String,Object>> getOrderList(Map<String, Object> map);

	int getOrderListCount(Map<String, Object> map);

	int addShipping(OrderOrderDO orderOrder);

	int editShipping(OrderOrderDO orderOrder);

	Map<String,Object> getHOrderById(String id);

	List<Map<String,Object>> statisticsList(Map<String, Object> map);

	int statisticsCount(Map<String, Object> map);

	List<Map<String,Object>> getDetailGoods(Map<String, Object> map);

	int getDetailGoodsCount(Map<String, Object> map);

	List<Map<String,Object>> getKUsers(Map<String, Object> map);

	int getKUsersCount(Map<String, Object> map);

	void exportExcel(Map<String,Object> map,List<Map<String,Object>> userList, ServletOutputStream out,HttpServletRequest request);

	void importExcel(MultipartFile file, String excelFileName);

	List<Map<String,Object>> getBackOrderList(Map<String, Object> map);

	int getBackOrderListCount(Map<String, Object> map);

	int backOrder(OrderOrderDO orderOrder);

	int backGood(Map<String, Object> map);

	OrderOrderDO getByOrder(String orderSn);

	R removeOrder(Map<String, Object> map);

	R pricePay(Map<String, Object> map);

	R ziTi(OrderOrderDO orderOrder);

	Map<String,Object> getTeamOrder(Map<String, Object> map);

	/**
	 * @author long
	 * 2020年6月16日上午11:31:52
	 * 方法释义: 定时修改订单状态收货
	 * 参数:
	 *
	 */
	void receivingOrderJob();

	void updateCmsAndScore();

	/**
	 * @author long
	 * 2020年7月20日下午3:14:22
	 * 方法释义:
	 * 参数:
	 *
	 */
	BigDecimal getPostFees(Map<String, Object> paramMap, List<String> cartList) throws Exception;

	/**
	 * @author long
	 * 2020年7月20日下午3:14:30
	 * 方法释义:
	 * 参数:paramMap total:数量 addressId 地址id
	 *
	 */
	BigDecimal getPostFees(Map<String, Object> paramMap, String string, String string2,int status) throws Exception;

	/**
	 * @author long
	 * 2020年9月9日下午7:35:25
	 * 方法释义:
	 * 参数:
	 *
	 */
	int countUserAndProductId(Map<String, Object> canMap);


    List<OrderOrderDO> getByPayNum(String payNum);

    Map<String, Object> getOrderDetails(Map<String, Object> params);

	/*换货接口*/
	List<Map<String,Object>> getModifyOrderList(Map<String, Object> map);

	int addModify(Map<String, Object> paramMap);
	/*后台换货同意并修改物流*/
	R modifyOrderT(Map<String, Object> map);

	/*后台换货操作*/
	R modifyOrderF(OrderOrderDO orderOrder);

	/*退货/换货详情*/
	Map<String,Object> getOrderByType(Map<String,Object> paramMap);

	/*用户页面-已反余额*/
    BigDecimal onceUseMoney(Map<String, Object> map);

    R addShopExpressInfo(Map<String, Object> paramMap);
}
